﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace smforj.common.model
{
    /// <summary>
    /// 全局变量
    /// </summary>
    public class GlobalCache
    {
        #region GlobalCache 实例

        private GlobalCache() { }
        private static GlobalCache _inst;
        public static GlobalCache Instance
        {
            get {
                if (_inst == null)
                    _inst = new GlobalCache();
                return _inst;
                }
        }
        #endregion
        
        #region static 变量  

        /// <summary>
        /// 系统id或商家id
        /// </summary>
        public static String SysId = string.Empty;

        /// <summary>
        /// 上报数据时间间隔 秒
        /// </summary>
        public static int UTimeSpan = 60;

        /// <summary>
        /// 读取数据时间间隔 毫秒
        /// </summary>
        public static int RTimeSpan = 500;

        /// <summary>
        /// 有效数据的时间间隔 秒
        /// </summary>
        public static int TTimeSpan = 20;
        /// <summary>
        /// 试衣间无效数据时间
        /// </summary>
        public static int UnuseTimeSpan = 60; 
        /// <summary>
        /// 是否是演示程序
        /// </summary>
        public static Boolean isShow = false;

        /// <summary>
        /// 监控类型 0衣柜 1试衣间
        /// </summary>
        public static String TType = "0";

        /// <summary>
        /// 天线
        /// </summary>
        public static int AntnnaNumber = 0;

        /// <summary>
        /// 下载图片保存路径
        /// </summary>
        public static String BaseImgPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "images");

        #endregion

        #region 数据库连接信息

        public static Connection Conn = null;
        #endregion
        
        #region 显示数据
        /// <summary>
        /// 搭配信息
        /// </summary>
        public static List<Collocation> colList = new List<Collocation>(); 

        #endregion


        #region Theme

        public static String HighContrastBlack = "HighContrastBlack";
        #endregion


        #region API
        public static String BaseUrl = string.Empty;
        /// <summary>
        /// 商品信息Url
        /// </summary>
        public static String CommodityUrl = string.Empty;

        /// <summary>
        /// 商品信息Url
        /// </summary>
        public static String CommodityListUrl = string.Empty;

        /// <summary>
        /// 商品信息Url
        /// </summary>
        public static String CommodityTypeListUrl = string.Empty;

        /// <summary>
        /// 拿起次数信息Url
        /// </summary>
        public static String PreferenceListUrl = string.Empty;

        /// <summary>
        /// 上传推荐信息Url
        /// </summary>
        public static String UploadRecommendUrl = string.Empty;

        /// <summary>
        /// 上传喜好信息
        /// </summary>
        public static String UploadPerenceUrl = string.Empty;

        /// <summary>
        /// 搭配信息
        /// </summary>
        public static String RankingUrl = String.Empty;

        /// <summary>
        /// 登陆api
        /// </summary>
        public static String LoginUrl = string.Empty; 
        /// <summary>
        /// 注销api
        /// </summary>
        public static String LogoutUrl = string.Empty;
        #endregion


        #region Login User

        /// <summary>
        /// 登陆用户
        /// </summary>
        public static LoginUser loginUser = new LoginUser();
        #endregion 


        #region local Device

        /// <summary>
        /// 设备id
        /// </summary>
        public static String DeviceID = "";
        /// <summary>
        /// 商铺Id
        /// </summary>
        public static String StoreID = "";
        #endregion


        #region 显示参数
        /// <summary>
        /// 读取要显示信息的数量
        /// </summary>
        public static int ShowCount = 15;
        #endregion


        #region 默认位置该参数只为测试使用
        public static String location = String.Empty;
        #endregion


    }
}
